<?xml version="1.0" encoding="ISO_8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

	<h:head>
	</h:head>
	
	<h:body>
	
	<p:growl  showDetail="true" sticky="false" life="3000" />
		<p:panel header="#{msg.historico_title}" >
	
			<h:form prependId="false" >				
			
				<p:dataTable id="tabela_historicos" value="#{historicoMB.historicos}" var="historicos" rows="5" emptyMessage="#{msg.historico_empty}" paginator="true" >
					
					<p:column headerText="#{msg.historico_nomeComponenteColumn}" filterBy="#{historicos.componente.nome}">
						<h:outputText value="#{historicos.componente.nome}"/>
					</p:column>		
					
					<p:column headerText="#{msg.historico_nomeUsuarioColumn}" filterBy="#{historicos.usuario.nome}">
						<h:outputText value="#{historicos.usuario.nome}"/>
					</p:column>	
					
					<p:column headerText="#{msg.historico_dataAcaoColumn}" filterBy="#{historicos.dataAcao}">
						<h:outputText value="#{historicos.dataAcao}"/>
					</p:column>	
					
					<p:column headerText="#{msg.historico_descricaoAcaoColumn}" filterBy="#{historicos.descricaoAcao}">
						<h:outputText value="#{historicos.descricaoAcao}"/>
					</p:column>	
					
				</p:dataTable>			
			
					<h:commandLink >  
					    <p:graphicImage value="#{pageContext.servletContext.contextPath}/imagens/pdf.png" title="#{msg.historico_gerarRelatorio}"/>
					    <p:dataExporter type="pdf" target="tabela_historicos" fileName="historico" preProcessor="#{historicoMB.preProcessPDF}"/>  
					</h:commandLink>  
			
			</h:form>
		</p:panel>
	</h:body>

</html>